{extend name="public:layout" /}
{block name="title"}司机待执行订单详情页{/block}
{block name="head"}
<style>
    .order_start_mm{
        width:80%;
        height:40px;
        border:2px solid #008972;
        margin:10px auto;
        display:block;
        padding:5px;
        border-radius:10px;
        font-size:20px;
        font-weight:500;
        color:#008972;
    }
    .red{color:red;}
</style>
{/block}
{block name="body"}

<!--公共头部-->
<h3 class="com_header">正在进行</h3>
<!--司机即将开始的订单-->
<form id="form" method="post" action="{:url('logic.order/delay')}">
    <div class="weui-cells weui-cells_form x_weui_cells">
        <input class="order_start_mm" type="number" datatype="n" name="day" placeholder="请输入延期天数">
        <input type="hidden" datatype="*" name="order_status" value="1">
        <input type="hidden" datatype="*" name="aid" value="{$Request.param.aid}">
        <div class="weui-cell x_weui_cell">
            <div class="weui-cell__hd"><label class="weui-label">行程单：</label></div>
            <div class="weui-cell__bd">
                <div class="red">{$info.title}</div>
            </div>
        </div>
        <div class="weui-cell x_weui_cell">
            <div class="weui-cell__hd"><label class="weui-label">订单编号：</label></div>
            <div class="weui-cell__bd">
                <div>{$info.order_odd}</div>
            </div>
        </div>
        <div class="weui-cell x_weui_cell">
            <div class="weui-cell__hd"><label class="weui-label">车牌号：</label></div>
            <div class="weui-cell__bd">
                <div>{$info.car_sn}</div>
            </div>
        </div>
        <div class="weui-cell x_weui_cell">
            <div class="weui-cell__hd"><label class="weui-label">车辆类型：</label></div>
            <div class="weui-cell__bd">
                <div>{:get_field_value('car','car_brand',['car_sn'=>$info['car_sn']])}</div>
            </div>
        </div>
        <div class="weui-cell x_weui_cell">
            <div class="weui-cell__hd"><label class="weui-label">司机姓名：</label></div>
            <div class="weui-cell__bd">
                <div>{$info.fleet_driver}</div>
            </div>
        </div>
        <div class="weui-cell x_weui_cell">
            <div class="weui-cell__hd"><label class="weui-label">导游/接车：</label></div>
            <div class="weui-cell__bd">
                <div>{$info.guide}</div>
            </div>
        </div>
        <div class="weui-cell x_weui_cell">
            <div class="weui-cell__hd"><label class="weui-label">客户联系方式：</label></div>
            <div class="weui-cell__bd">
                <div>{$info.guide_tel}</div>
            </div>
        </div>
        <div class="weui-cell x_weui_cell">
            <div class="weui-cell__hd"><label class="weui-label">出发时间：</label></div>
            <div class="weui-cell__bd">
                {$info.out_time}
            </div>
        </div>
        <div class="weui-cell x_weui_cell">
            <div class="weui-cell__hd"><label class="weui-label">预计完成：</label></div>
            <div class="weui-cell__bd">
                {$info.order_end_time}
            </div>
        </div>
    </div>
    <div style="height:85px;"></div>
    <div style="text-align:center;position:fixed;width:100%;bottom:0;border-top:1px solid #e8e8e8;background:#fff;z-index:999; ">
        <div style="padding:10px;font-size:14px;text-align:center;">距结束还有{php}echo ceil((strtotime($info['order_end_time'])-time())/3600).'小时';{/php}，延期请执行</div>
        <button type="button" id="Butsub" class="tijiao" style="margin:0 auto;width:100%;border-radius:0;height:45px;line-height:45px;">确定延期</button>
    </div>
</form>

<!--返回首页-->
<div class="back_index">
	<a href="/system">
		<img class="back_img" src="/public/mobile/static/images/back1.png" />
	</a>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    ajaxSubForm('#Butsub',function(res){
        if(res.code==1){
            location.href="/system/op/index.html?mid=14&tpl=sj_plan&order_type=2";
        }else{
            $.toptip(res.msg, 'error');
        }
    });
</script>
{/block}
